const 钉级无人机AI = () => {
return extend(AIController, {
updateMovement(){
var closestTarget = this.getClosestSpawner();
var core = this.unit.closestEnemyCore();
if(this.target != null){
this.unit.lookAt(this.target);
if(this.unit.type.circleTarget){
this.circleAttack(9999);
}
if(!this.unit.within(this.target, this.unit.type.range * 0.5)){
this.unit.aim(this.target);
this.moveTo(this.target, this.unit.type.range * 0.5);
}
} else if(this.target == null && core != null) {
this.moveTo(core, this.unit.type.range * 0.5);
}
},
});
}
exports.钉级无人机AI = 钉级无人机AI;